package display;

import javax.swing.JComponent;
import java.io.File;
import javax.swing.JPanel;


/**
 * @author gabriella
 *
 */
public interface Display {
	
	/**
	 * starts (or continues) the simulation
	 */
	void startSimulation();
	
	/**
	 * stops (or pauses) the simulation
	 */
	void stopSimulation();
	
	/**
	 * function to check whether the simulation is finished 
	 * @return true if the simulation is ready, false otherwise
	 */
	boolean isReady();
	
	/**
	 * adds DisplayListener (listening to stopSimulation events)
	 * @param toAdd DisplayListener
	 */
	public void addListener(DisplayListener toAdd);
	
	/**
	 * Forces the simulation to stop
	 */
	void abort();
	
	/**
	 * Saves a screenshot of the current drawing
	 * @param f File to write the EPS
	 */
	boolean saveScreenShot(File f);

	/**
	 * Set up the display taking into account the panel's size
	 */
	void setupSize();
	
	/**
	 * Removes mouse listeners & other cleanup
	 */
	void destroy();

	/**
	 * Initialization 
	 */
	void init();
	
}
